On 8/25/2023 1:45 PM, denis.ma...@unibe.ch wrote:
-Ursprüngliche Nachricht-
Von: Hans Hagen
Gesendet: Freitag, 25. August 2023 09:06
An: Maier, Denis Christian (UB) ; mailing list for
ConTeXt users
Betreff: Re: [NTG-context] Re: xmldoif: checking for contents of attribute
On 8/25/2023
> -Ursprüngliche Nachricht-
> Von: Hans Hagen
> Gesendet: Freitag, 25. August 2023 09:06
> An: Maier, Denis Christian (UB) ; mailing list for
> ConTeXt users
> Betreff: Re: [NTG-context] Re: xmldoif: checking for contents of attribute
>
> On 8/25/2023 8:22 AM, de
On 8/25/2023 8:22 AM, denis.ma...@unibe.ch wrote:
Thanks for your help. I can use that, but why is this sort of double-checking
necessary here?
because containsa in a function that has checking while find is just the
lua find .. so i've added a check in that one too now but no upload
Hans
> -Ursprüngliche Nachricht-
> Von: Thomas A. Schmitz
> Gesendet: Donnerstag, 24. August 2023 16:35
> An: mailing list for ConTeXt users
> Betreff: [NTG-context] Re: xmldoif: checking for contents of attribute
>
>
> One way would be to do the search in Lua
> -Ursprüngliche Nachricht-
> Von: Hans Hagen
> Gesendet: Donnerstag, 24. August 2023 16:54
> An: ntg-context@ntg.nl
> Betreff: [NTG-context] Re: xmldoif: checking for contents of attribute
>
> On 8/24/2023 4:11 PM, denis.ma...@unibe.ch wrote:
> > Hi,
> >
On 8/24/2023 4:11 PM, denis.ma...@unibe.ch wrote:
Hi,
I'm trying to check whether an attribute contains (or, actually starts with) a
given string.
I've tried a whole bunch of different combinations, but I've had no luck so
far. Minimal example below. Anyone has a hint?
Best,
Denis
One way would be to do the search in Lua; when you have multiple searches to
perform, that may be the easiest way to go. For example:
\startxmlsetups xml:test
\xmlsetsetup{#1}{*}{-}
\xmlsetsetup{#1}{doc|element}{xml:*}
\stopxmlsetups
Hi,
I'm trying to check whether an attribute contains (or, actually starts with) a
given string.
I've tried a whole bunch of different combinations, but I've had no luck so
far. Minimal example below. Anyone has a hint?
Best,
Denis
%
done that. But I don't seem to have the basic context of
> > how the processing works in order. All I have so far is this as a
> > starting
> > point:
> >
> Really? I told you about the various commands \xmldoif, but there's nothing in
> your starting point. I don't want
On 8/21/23 17:59, Michael Löscher wrote:
Yes, I have done that. But I don't seem to have the basic context of how
the processing works in order. All I have so far is this as a starting
point:
Really? I told you about the various commands \xmldoif, but there's
nothing in your starting point
p
\startpar\xmlflush{#1}\stoppar
\stopxmlsetups
\startxmlsetups xml:blockquote
\startblockquote\xmlflush{#1}\stopblockquote
\stopxmlsetups
\startxmlsetups xml:section:level3
\xmldoif{#1}{/blockquote} {
\xmldoifnot{#1}{/p} {
\section{\xmlflush{#1}}
}
}
e existing commands we can use
\doifelsebufferempty
\doifelsebuffersomething
\doifelsebuffernothing
or (we already have \xmldoif... and \btxdoif...)
\bufferdoifelseempty
\bufferdoifelsesomething
\bufferdoifelsenothing
Wolfgang
___
I
\NC \xmlfirst{#1}{name/surname/text()} \NC \NR
\BC gender \NC \xmlfirst{#1}{gender} \NC \NR
\stoptabulate
\stopxmlsetups
\startxmlsetups xml:childref
% \startsubsubject[title=Child]
\xmlfirst{main}{/database/people/person[@handle='\xmlatt{#1}{hlink}']}
% \stopsubsubject
\stopxmlsetups
\s
On 5/16/19 8:45 PM, Wolfgang Schuster wrote:
> Pablo Rodriguez schrieb am 16.05.2019 um 18:43:
>> [...]
>> After checking i-context, the options for the second pair of brackets are:
>>
>>KEY = VALUE
>>
>> Well, I think this is the standard case. Aren’t values inherited from
>> \setuphead? What
Pablo Rodriguez schrieb am 16.05.2019 um 18:43:
Dear list,
I have the following sample:
\setuphead[chapter]
[beforesection=\TeX,
aftersection=\TeX]
\starttext
\startchapter[title=Chapter,
beforesection=\ConTeXt,
aftersection=\ConTeXt]
On 5/16/19 6:43 PM, Pablo Rodriguez wrote:
> [...]
> What would be my approach to deal with "\xmldoif{#1}{.[@id='topic' and
> contains(@class,'hidden')]}" in beforesection?
>
> I realize that "\definehead[specialchapter][chapter]" would be a
> workaround,
After checking i-context, the options for the second pair of brackets are:
KEY = VALUE
Well, I think this is the standard case. Aren’t values inherited from
\setuphead? What would be the valid keys for this case?
I need to use \xmldoif in beforesection and aftersection. As far as I
can see
Hi Aditya,
The ConTeXt team did a great job in writing the manual xml-mkiv.pdf, but
I think it is not meant for a beginner.
Its contents is rather overwhelming when trying it for the first time.
For me, I don't use luatex a lot, so that adds to the difficulty of
trying it out.
Regards,
On Thu, 2 May 2019, Geert Verhaag wrote:
Yes, I got it working!
It is somewhat tricky.
Trying to understanding the concepts behind all this isn't easy for me,
but I'm bashing on.
I also find understanding XML processing rules to be complicated. I simply
convert the XML to a lua table, and
prompt reply!
The output Euro set! is printed always, it doesn't matter whether I put
EURO or DOLLAR first?!
Hi Geert,
my fault, the conditional should read:
\xmldoif{#1}{currency[position()==1 and contains(text(),'EURO')]}
{Euro set!}
I hope it works fine now.
Pablo
--
http
On 5/1/19 9:28 PM, Geert Verhaag wrote:
> Hoi Pablo,
>
> Thanks for your prompt reply!
>
> The output Euro set! is printed always, it doesn't matter whether I put
> EURO or DOLLAR first?!
Hi Geert,
my fault, the conditional should read:
\xmldoif{#1}{currency[position()==1
all this is far too complex for me! The documentation simply
isn't meant for beginners like me, sorry!
Regards,
Gerard
On 01-05-19 13:20, Pablo Rodriguez wrote:
On 4/30/19 9:58 PM, Geert Verhaag wrote:
[...]
\startxmlsetups xml:invoice:invoice
\xmlfirst{#1}{currency} \par
\xmldoif
On 4/30/19 9:58 PM, Geert Verhaag wrote:
> [...]
> \startxmlsetups xml:invoice:invoice
> \xmlfirst{#1}{currency} \par
> \xmldoif{\xmlfirst{#1}{currency}}{contains(text(),'EURO')} {
> Euro set! \par
> }
> [...]
> But the xmldoif command doesn't cause
Hi,
I've the following XML tag in my XML file:
EURO
.
with invoice being the root tag!
Now I have a setup defined as below (only part!):
\startxmlsetups xml:invoice:invoice
\xmlfirst{#1}{currency} \par
\xmldoif{\xmlfirst{#1}{currency}}{contains(text(),'EURO')} {
Euro set
24 matches
Mail list logo